import { UserTypeEnum } from "@/enums/system/UserEnum";
import OpportunityAPI from "@/api/opportunity";
// 装修商机
const materialTableColumnsData = [
  {
    type: "index",
    label: "序号",
    width: 60,
    align: "center",
  },
  {
    width: 150,
    label: "地区",
    prop: "coins",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 120,
    label: "小区",
    prop: "categoryName",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 120,
    label: "业主姓名",
    prop: "budget",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "联系电话",
    prop: "ownName",
    align: "center",
    showOverflowTooltip: true,
  },

  {
    width: 150,
    label: "面积",
    prop: "size",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "装修类型",
    prop: "floorPlan",
    align: "center",
    showOverflowTooltip: true,
    customSlot: "floorPlan",
  },
  {
    width: 150,
    label: "空间",
    prop: "decorationBudget",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "装修形式",
    prop: "decorationTypeText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "开工时间",
    prop: "houseStructureText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "预算(元)",
    prop: "houseTypeText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "定价",
    prop: "houseTypeText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 180,
    label: "发布时间",
    prop: "publishTime",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 200,
    label: "操作",
    prop: "handle",
    fixed: "right",
    align: "center",
    showOverflowTooltip: true,
    customSlot: "handle",
  },
];
// 材料商机
const designerTableColumnsData = [
  {
    type: "index",
    label: "序号",
    width: 60,
    align: "center",
  },
  {
    width: 150,
    label: "地区",
    prop: "coins",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 120,
    label: "小区",
    prop: "categoryName",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 120,
    label: "业主姓名",
    prop: "budget",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "联系电话",
    prop: "ownName",
    align: "center",
    showOverflowTooltip: true,
  },

  {
    width: 150,
    label: "面积",
    prop: "size",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "品类",
    prop: "decorationBudget",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "商品",
    prop: "decorationTypeText",
    align: "center",
    showOverflowTooltip: true,
  },

  {
    width: 150,
    label: "空间",
    prop: "houseStructureText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 150,
    label: "采买时间",
    prop: "houseTypeText",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 180,
    label: "预算(元)",
    prop: "publishTime",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 180,
    label: "定价",
    prop: "publishTime",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 180,
    label: "发布时间",
    prop: "publishTime",
    align: "center",
    showOverflowTooltip: true,
  },
  {
    width: 200,
    label: "操作",
    prop: "handle",
    fixed: "right",
    align: "center",
    showOverflowTooltip: true,
    customSlot: "handle",
  },
];
/**
 * designer  展示不同，接口不同
 * material 材料商
 */
let designerConfig = {
  opportunityType: 1, // 设计师机会类型
  // 列表请求接口不同
  request: OpportunityAPI.getDesignerOpportunityList,
  // 不同角色展示不同的字典列表
  TagSelectList: ["DecorationForm", "DecorationStyle", "PriceRange", "HouseStructure", "HouseType"],
  tableColumnsData: designerTableColumnsData,
};
let materialConfig = {
  opportunityType: 2, // 材料商机会类型
  // 列表请求接口不同
  request: OpportunityAPI.getMaterialOpportunityList,
  // 不同角色展示不同的字典列表
  TagSelectList: ["GoodsCategory", "DecorationStyle", "PriceRange", "HouseStructure", "HouseType"],
  tableColumnsData: materialTableColumnsData,
};
export const showWhatOpportunity = {
  [UserTypeEnum.DECORATION_COMPANY.value]: designerConfig,
  [UserTypeEnum.DESIGNER.value]: designerConfig,
  [UserTypeEnum.HOME_BUILDING_MATERIALS.value]: materialConfig,
};

/**
 * 面积列表
 */

export const sizeList = [
  {
    label: "60㎡以下",
    value: 1,
    valueObject: {
      start: 0,
      end: 60,
    },
  },
  {
    value: 2,
    valueObject: {
      start: 60,
      end: 80,
    },
    label: "60-80㎡",
  },
  {
    value: 3,
    valueObject: {
      start: 80,
      end: 100,
    },
    label: "80-100㎡",
  },
  {
    value: 4,
    valueObject: {
      start: 100,
      end: 150,
    },
    label: "100-150㎡",
  },
  {
    value: 5,
    valueObject: {
      start: 150,
      end: 200,
    },
    label: "150-200㎡",
  },
];
